<script>
function revisapass(){
var pass1=document.getElementById("CiuuserPassword").value;
var pass2=document.getElementById("CiuuserConfirm").value;

if(pass1==pass2){
    return true;
}else{
    alert("Claves diferentes");
	document.getElementById("CiuuserPassword").value="";
	document.getElementById("CiuuserConfirm").value="";	
    return false;
}   
}
</script>


<div class="ciuusers form">
<?php echo $this->Form->create('Ciuuser');?>
	<fieldset>
	
		<?php $url=$this->Html->link('Docentes',array('action' => 'indexteacher')); ?>
		<?php  $tokens=array(0=>$url, 1=>"Adicionar") ?>
        <?php echo $this->element("breadcrumb", array('tokens'=>$tokens))?>
		
	<?php
		echo $this->Form->input('first_names',array('required'=>''));
		echo $this->Form->input('last_names',array('required'=>''));
		echo $this->Form->input('birthday',array('required'=>'', 'type'=>'date'));
		echo $this->Form->input('document_type',array('options'=>array(''=>'Seleccione','CC'=>'Cedula Ciudadania', 'CE'=>'Cedula Extranjeria') ));
		echo $this->Form->input('document', array('required'=>'','digits'=>'','number'=>''));
		echo $this->Form->input('expedition_date',array('required'=>'', 'type'=>'date'));
                echo $this->Form->input('expedition_city',array('required'=>''));
               echo $this->Form->input('name',array('type'=>'hidden'));
                echo $this->Form->input('username', array('type'=>'hidden'));
		echo $this->Form->input('password',array('required'=>'','type'=>'password', 'label'=>'Clave'));
		echo $this->Form->input('confirm',array('required'=>'','type'=>'password', 'label'=>'Confirme Clave', 'onBlur'=>'javascript:revisapass();'));
		echo $this->Form->input('address', array('required'=>''));
		echo $this->Form->input('telephone', array('required'=>''));
		echo $this->Form->input('email', array('required'=>''));
		echo $this->Form->input('academic_level', array('options'=>
		array('Ninguno'=>'Ninguno'
		, 'Primaria'=>'Primaria'
		, 'Secundaria'=>'Secundaria'
		, 'Tecnico'=>'Tecnico'
		, 'Pregrado'=>'Pregrado'
		, 'Postgrado'=>'Postgrado'
		) ) );
		echo $this->Form->input('occupation');
		echo $this->Form->input('occupation_description');
		echo $this->Form->input('contact_name');
		echo $this->Form->input('contact_telephone');
		echo $this->Form->input('isactive',array('type'=>'hidden'));
                echo $this->Form->input('ciuuserstate_id',array('type'=>'hidden'));
		echo $this->Form->input('ciuusertype_id',array('type'=>'hidden'));
		echo $this->Form->input('ciustudenttype_id',array('type'=>'hidden'));
		echo $this->Form->input('ciuteachertype_id',array('type'=>'hidden'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
